package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.NewsTypeDao;
import com.neuedu.model.NewsType;
import com.neuedu.service.NewsTypeService;

@Service
public class NewsTypeServiceImpl implements NewsTypeService {

	// 依赖注入
	@Autowired
	private NewsTypeDao NewsTypeDao;
	
	public void setNewsTypeDao(NewsTypeDao NewsTypeDao) {
		this.NewsTypeDao = NewsTypeDao;
	}
	
	@Override
	public int countNewsType() {
		return NewsTypeDao.countNewsType();
	}

	@Override
	public List<NewsType> findAll(Map<String, Object> map) {
		return NewsTypeDao.findAll(map);
	}

	@Override
	public int addNewsType(NewsType u) {
		return NewsTypeDao.addNewsType(u);
	}

	@Override
	public int updateNewsType(NewsType u) {
		return NewsTypeDao.updateNewsType(u);
	}

	@Override
	public int deleteNewsType(int id) {
		return NewsTypeDao.deleteNewsType(id);
	}

	@Override
	public List<NewsType> findList() {
		// TODO Auto-generated method stub
		return NewsTypeDao.findList();
	}

}
